﻿using DevExpress.Data.Filtering;
using DevExpress.ExpressApp;
using DevExpress.Xpo;
using Microsoft.OData.Client;

namespace EasyXaf.ObjectSpaces.OData;

public interface IODataObjectSpace : IObjectSpace
{
    Uri ServiceRoot { get; }

    DataServiceContext ODataContext { get; }

    void AcceptObject(object obj);

    IQueryable GetObjectsQuery(Type objectType, CriteriaOperator criteria = null, SortProperty[] sorting = null);

    IList<T> CreateCollection<T>(CriteriaOperator criteria, object masterObject, string propertyName);
}
